{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# jupyter install\n",
    "\n",
    "\n",
    "## on window\n",
    "install anoconda\n",
    "mirror url https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/\n",
    "\n",
    "find jupyter add to environment path\n",
    "\n",
    "## jupyter cmd\n",
    "jupyter notebook\n",
    "\n",
    "jupyter notebook --generate-config\n",
    "\n",
    "jupyter notebook --help\n",
    "\n",
    "jupyter notebook E:\\jupter\n",
    "\n",
    "## jupyter 使用\n",
    "#代表标题 ##代表副标题  \n",
    "\n",
    "ctrl+enter 运行\n",
    "\n",
    "esc+m 将code cell 改为 markdown cell\n",
    "\n",
    "## jupyter 快捷键\n",
    "### Esc + F 在代码中查找、替换，忽略输出\n",
    "### Esc + O 在cell和输出结果间切换\n",
    "### 选择多个cell: \n",
    "### Shift + J 或 Shift + Down 选择下一个cell\n",
    "### Shift + K 或 Shift + Up 选择上一个cell\n",
    "### 一旦选定cell，可以批量删除/拷贝/剪切/粘贴/运行。当你需要移动notebook的一部分时这个很有用\n",
    "### Shift + M 合并cell\n",
    "### ALT+ENTER 插入一个单元格"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "1. \"shift + enter\" notebook单元格内执行代码，并且自动跳至下一个的单元格\n",
    "2. \"tab\" 自动补齐代码，相当于eclipse的 alt + /\n",
    "3. \"shift + tab\" 连按2次，显示注释，相当于eclipse的f2\n",
    " \n",
    " 命令模式（蓝框）和 编辑模式（绿框）的切换：\n",
    "蓝 - 绿：\"Enter\"， 绿 - 蓝 ：\"Esc\"\n",
    " \n",
    "4. 当前单元格下方创建单元格（命令模式下）：\"A\"\n",
    "5. 当前单元格上方创建单元格 (命令模式下)：\"B\"\n",
    "6. 当前单元格MarkDown模式和Code模式切换（命令模式下）：m到c为\"Y\", c到m为\"M\"\n",
    "7. 当前单元格内容增加行号（命令模式下）：\"L\"\n",
    "8. 删除单元格：连续两次按 \"D\"\n",
    "9. 保存：\"S\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "i = 4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "int"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(i)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "f = 4.1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "float"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(f)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "advanced data types"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "l = [3,2,1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[3, 2, 1]\n"
     ]
    }
   ],
   "source": [
    "print(l)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "d = {\"foo\":1,\"Bar\":2.3}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1\n"
     ]
    }
   ],
   "source": [
    "print(d[\"foo\"])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "n = None"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "NoneType"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(n)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# adanced printing"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "s = \"s = (%s , %s)\" % (i,f)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "s = (4 , 4.1)\n"
     ]
    }
   ],
   "source": [
    "print(s)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "%matplotlib inline"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
